<!doctype html>
<html  class="x-admin-sm">
<head>
    <#assign path=request.getContextPath() >
    <meta charset="UTF-8">
	<title>后台登录-X-admin2.2</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="${path}/css/font.css">
    <link rel="stylesheet" href="${path}/css/login.css">
	  <link rel="stylesheet" href="${path}/css/xadmin.css">
    <script type="text/javascript" src="${path}/js/jquery-1.9.1.min.js"></script>
    <script src="${path}/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${path}/js/ajax.default.js"></script>
    <!--[if lt IE 9]>
      <script src="${path}/js/html5.min.js"></script>
      <script src="${path}/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .login-btn{
            display: inline-block;
            padding: 12px 24px;
            margin: 0px;
            font-size: 18px;
            line-height: 24px;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            cursor: pointer;
            color: rgb(255, 255, 255);
            background-color: rgb(24, 159, 146);
            border-radius: 3px;
            border: none;
            appearance: none;
            outline: none;
            width: 100%;
        }
    </style>
</head>
<body class="login-bg">
    
    <div class="login layui-anim layui-anim-up">
        <div class="message">x-admin2.0-管理登录</div>
        <div id="darkbannerwrap"></div>
        
        <input name="username" id="userName" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
        <hr class="hr15">
        <input name="password" id="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
        <hr class="hr15">
        <input value="登录11" onclick="doLogin()"  style="width:100%;" type="button">
        <hr class="hr20" >
    </div>
    <script type="application/javascript">
        var layer;
        layui.use('layer', function(){
            layer = layui.layer;
        });
        function doLogin() {
            $.ajax({
                url: "${path}/user/doLogin",
                type: "POST",
                data: {
                    "userName": $("#userName").val(),
                    "userPassword": $("#password").val()
                },
                success: function (msg) {
                    if (msg.code == 200) {
                        layer.msg('登录成功');
                        window.location.href = '${path}/common/index'
                    } else {
                        layer.msg('登录失败');
                    }
                }
            });
        }

    </script>
</body>
</html>